package filter;

import common.Episode;

public class SeedFilter implements EpisodeFilter {
	
	private int minSeeders;
	private int maxSeeders;
	
	public SeedFilter(int min, int max){
		this.minSeeders = min;
		this.maxSeeders = max;
	}

	@Override
	public boolean apply(Episode episode) {
		int seeders = episode.getTorrent().getState().getDownloaded();
		return seeders >= minSeeders && seeders <= maxSeeders;
	}

}
